#pragma once

class Message
{
public:
	Message(void);
	~Message(void);
};


struct CT_MSG
{
	
	 enum
	 {
		  UN,
		  LOGIN,
		  QUIT,
		  SPEAK,
		  S2C
	 }msg;
	 
	 CT_MSG():msg(UN){size = sizeof(CT_MSG);}
	 size_t size;
};

struct CT_MSG_login	: public CT_MSG
{
	CT_MSG_login(){msg = LOGIN;}
	
};

struct CT_MSG_quit	: public CT_MSG
{
	CT_MSG_quit(){msg = QUIT;size = sizeof(CT_MSG_quit);}
	int id;
};


struct CT_MSG_S2C	: public CT_MSG
{
	CT_MSG_S2C()
	{
		size = sizeof(CT_MSG_S2C);
		msg = S2C;
		ZeroMemory(str,500);
	}
	size_t len;
	char  str[500];
};
